package edu.whu.rose.clock.ssql.index;

import java.io.UnsupportedEncodingException;
import java.util.ArrayList;

import com.sleepycat.je.DatabaseException;
import com.sleepycat.je.Environment;

import edu.whu.rose.clock.ssql.util.SequentialIntArray;

public class EdgeIndexDB extends IndexDB {

	public EdgeIndexDB(Environment dbEnv) {
		super(dbEnv, "edgeIL");
	}
	
	public EdgeIndexDB(Environment dbEnv, String dbName) {
		super(dbEnv, dbName);
	}
	
	public String[] search(String keyword) {
		String[] result = null;
		try {
			String list = this.get(keyword);
			if (list != null) {
				result = list.split(",");
			}
		}
		catch (DatabaseException ex) {
			ex.printStackTrace();
		}
		catch (UnsupportedEncodingException ex) {
			ex.printStackTrace();
		}
		return result;
	}

}
